package com.ebei.admin.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ebei.admin.model.entity.SysCompany;
import com.ebei.common.util.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface SysCompanyMapper extends BaseMapper<SysCompany> {
    /**
     * 根据参数查询记录
     *
     * @param query
     * @param condition
     * @return
     */
    public List<Map<String, Object>> findCompanyListByParams(Query<Map<String, Object>> query, Map<String, Object> condition);

    /**
     * 根据用户id查询所属企业
     * @param userId
     * @return
     */
    Map<String,Object> findByUserId(Integer userId);

    /**
     * 根据园区id查询公司json
     * @param params
     * @return
     */
    List<Map<String,Object>> getCompanyJsonForYHPC(Map<String, Object> params);

    /**
     * 获取所有公司 设备用
     * @return
     */
    List<Map<String,Object>> getAllCompanyForDevice(Query<Map<String, Object>> query, Map<String, Object> params);

}
